﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smartec.Accounts.Camel.AMS.Model.Entities;
using Smartec.Accounts.Camel.AMS.Model.Repository;

namespace Smartec.Accounts.Camel.AMS.Model.Facades
{
    public static class LightWordFacade
    {
        public static void AddLightWord(LightWord LightWord)
       {
           LightWordRepository.AddLigthWord(LightWord);
          
       }

        public static List<LightWord> GetAllLightWord()
       {
           return LightWordRepository.All();
       }

        public static LightWord GetLightWordById(int id)
       {
           return LightWordRepository.All().FirstOrDefault(t => t.ID == id);
       }
       public static void Save()
       {
           NewsRepository.Save();
       }
       public static void UpdateLightWord(LightWord LightWord)
       {
           var _LightWord = GetLightWordById(LightWord.ID);
           _LightWord.Text = LightWord.Text;
          
       }

       public static void DeleteLightWordById(int id)
       {
           LightWordRepository.DeleteLightWordById(id);
       }
    }
}
